<template>
    <el-descriptions title="用户信息" :column="2" border backgroundColor="black">
        <el-descriptions-item label="账号">{{ account.account }}</el-descriptions-item>
        <el-descriptions-item label="姓名">{{ account.name }}</el-descriptions-item>
        <el-descriptions-item label="邮箱">{{ account.email }}</el-descriptions-item>
        <el-descriptions-item label="年龄">{{ account.age }}</el-descriptions-item>
        <el-descriptions-item label="性别">{{ account.gender }}</el-descriptions-item>
        <el-descriptions-item label="身份">{{ account.duration == 0 ? '学生' : '老师' }}</el-descriptions-item>
        <el-descriptions-item label="积分">{{account.score}}</el-descriptions-item>
    </el-descriptions>
</template>

<script>
export default {
    data() {
        return {
            account: ''
        }
    },
    mounted() {
        this.account = JSON.parse(localStorage.getItem("userinfo")).userinfo
        console.log(this.account)
    }
}
</script>
<style scoped>
.el-descriptions {
    line-height: 40px;
    width: 60%;
}

</style>

